package com.thiswhyme.redis.lock.helper;

import java.util.concurrent.TimeUnit;

/**
 * sleep util
 *
 * @author: thiswhyme
 * @date: 2022/10/26
 */
public class Sleeper {

    public static void sleep(long time, TimeUnit timeUnit){
        try {
            timeUnit.sleep(time);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
}
